<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <meta http-equiv="X-UA-Compatible" content="ie=edge">
  <title>Document</title>
</head>
<body>
  
  <div id="app">
    <child msg="1"></child>
    <child msg="静态内容"></child>
    <child msg="msg"></child>
    <child :msg="msg"></child>
  </div>

  <script src="./vue.js"></script>
  <script>
    const child = {
      template: `
        <div>{{msg}}</div>
      `,
      props: ['msg']
    }

    Vue.component('child', child)
    const app = new Vue({
      el: "#app",
      data: {
        msg: "父组件data中的数据"
      }
    })
  </script>
</body>
</html>